package com.smart.manager.product.entities.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.product.entities.enums.PigstyKind;
import com.smart.manager.product.entities.enums.ProfileStage;
import com.smart.manager.product.entities.enums.ProfileStatus;
import com.smart.manager.product.entities.views.PigBreedView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.util.List;

/**
 * 猪仔配置 - 销售管理
 * @author leo
 * @date 2023/09/07
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Accessors(chain = true)
@Table(name = "product_pig_goods")
public class PigGoods extends BaseLongModel {

    @ApiModelProperty("商品代码")
    private String code;

    @ApiModelProperty("商品名称")
    private String name;

    @ApiModelProperty("猪仔日龄")
    private Integer dayNum;

    @ApiModelProperty("猪仔预估体重")
    private Integer weight;

    @ApiModelProperty("是否允许兑换")
    private Boolean isExchange;

    @ApiModelProperty("喂养模式")
    private PigstyKind mode;

    @ApiModelProperty("所属阶段")
    private ProfileStage stage;

    @ApiModelProperty("猪仔档案")
    @ManyToOne
    @JoinColumn(name = "breed",referencedColumnName = "code")
    private PigBreedView breed;

    @ApiModelProperty("摄像头")
    private transient List<String> camera;

    @ApiModelProperty("显示猪仔价格")
    private Integer showPrice;

    @ApiModelProperty("全额价格")
    private Integer fullPrice;

    @ApiModelProperty("裸猪仔价格")
    private Integer price;

    @ApiModelProperty("钻石抵扣金额(-)")
    private Integer deduction;

    @ApiModelProperty("包含月份")
    private Integer month;

    @ApiModelProperty("认养赠送(鸡)")
    private Integer chicken;

    @ApiModelProperty("认养赠送(蛋)")
    private Integer egg;

    @ApiModelProperty("疾病险(+)")
    private Integer insurance;

    @ApiModelProperty("养猪险(+)")
    private Integer accident;

    @ApiModelProperty("备用金(+)")
    private Integer reserveFund;

    @ApiModelProperty("销售状态")
    private ProfileStatus status;

    @ApiModelProperty("销售库存")
    private Integer stock;

    @ApiModelProperty("商品介绍")
    private String introduce;

    @ApiModelProperty("是否促销")
    private Boolean promotion;

    @ApiModelProperty("促销标语")
    private String msg;

    @ApiModelProperty("显示排序")
    private Integer sort;

}
